// components/like/like.js
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        msg:String
    },

    /**
     * 组件的初始数据
     */
    data: {
        count:10,
    },

    created(){
        console.log("created")
    },
    attached(){
        console.log("attached")
    },
    ready(){

    },
    moved(){

    },
    detached(){

    },

    /**
     * 组件的方法列表
     */
    methods: {
        changeCount(){
            this.setData({
                count:++this.data.count 
            })
        },
        changeparent(){
            var myEventDetail = {
                count:100
            } // detail对象，提供给事件监听函数
            var myEventOption = {} // 触发事件的选项
            this.triggerEvent('myevent', myEventDetail, myEventOption)
        }
    }
})
